<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>MapVGL</title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <style>
        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
        #map_container {
            width: 100%;
            height: 100%;
            margin: 0;
        }
    </style>
    <script src="//api.map.baidu.com/api?v=1.0&type=webgl&ak=1XjLLEhZhQNUzd93EjU5nOGQ"></script>
    <script src="//mapv.baidu.com/build/mapv.min.js"></script>
    <script src="/js/my/common.js"></script>
    <script src="https://code.bdstatic.com/npm/mapvgl@1.0.0-beta.62/dist/mapvgl.min.js"></script>

    <!-- 如果使用到Three.js相关的图层需要引用 -->
    <script src="https://code.bdstatic.com/npm/mapvgl@1.0.0-beta.62/dist/mapvgl.threelayers.min.js"></script>
</head>
<body>
<div id="map_container"></div>
<script>
    // 1. 创建地图实例


        var map = new BMapGL.Map('map_container');
      //  var map = initMap();

        var point = new BMapGL.Point(116.387456, 39.925406);
        map.centerAndZoom(point, 12.0);

        map.setHeading(30);

        var view = new mapvgl.View({

            /*
        effects: [new mapvgl.BloomEffect({
            blurSize: 3
        })],
        */
            map: map
        });

        try {
            var layer = new mapvgl.HeatGridLayer({
                gradient: {
                    0.0: 'rgb(50, 50, 256)',
                    0.1: 'rgb(50, 250, 56)',
                    0.5: 'rgb(250, 250, 56)',
                    1.0: 'rgb(250, 50, 56)'
                },
                data: [{
                    geometry: {
                        type: 'Point',
                        coordinates: [116.392394, 39.910683]
                    }
                }]
            });

            view.addLayer(layer);
        }
        catch (e) {
            alert(e);
        }



</script>
</body>
</html>